package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface AskDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addAsk(askLeave: AskLeave):Long

    @Query("select * from askleave order by createTime limit (:page-1)*:size,:page*:size")
    fun selectByPage(page:Int,size:Int):List<AskLeave>

    @Query("select count(*) from askleave")
    fun getCount():Int
}